package test.com.flexoop.utilities.dateutils {

	import com.flexoop.utilities.dateutils.DateUtils;
	
	import org.flexunit.Assert;
	import org.hamcrest.date.DateEqualMatcher;
	
	public class DateAddTest {

		public function DateAddTest() {
		}
		
		[Test]		public function testYear():void {
			var _dateEqualMatcher:DateEqualMatcher = new DateEqualMatcher( new Date( 2015, 0, 1 ) );
			Assert.assertTrue( _dateEqualMatcher.matchesSafely( DateUtils.dateAdd( DateUtils.YEAR, 6, new Date( 2009, 0, 1 ) ) ) );
		}
		[Test]		public function testMonth():void {
			var _dateEqualMatcher:DateEqualMatcher = new DateEqualMatcher( new Date( 2009, 8, 14 ) );
			Assert.assertTrue( _dateEqualMatcher.matchesSafely( DateUtils.dateAdd( DateUtils.MONTH, 2, new Date( 2009, 6, 14 ) ) ) );
		}
		[Test]		public function testDayOfMonth():void {
		}
		[Test]		public function testHours():void {
		}
		[Test]		public function testMinutes():void {
		}
		[Test]		public function testSeconds():void {
		}
		[Test]		public function testMilliseconds():void {
			/* var _dateEqualMatcher:DateEqualMatcher = new DateEqualMatcher( new Date( 2009, 8, 14 ) );
			var _millisecondsSinceEpoch:Number = new Date( 2009, 8, 14 ).time - new Date( 1970, 1, 1 ).time;
			var _dateAddValue:Date = DateUtils.dateAdd( DateUtils.MILLISECONDS, _millisecondsSinceEpoch, new Date( 1970, 1, 1 ) );
			Assert.assertTrue( _dateEqualMatcher.matchesSafely( _dateAddValue ) ); */
		}
		[Test]		public function testWeek():void {
		}
	}
}